<div id="RegisterWorkPeople">
    <section class="three fourths padded  bounceInDown animated  align-bottom-desktop">
        <!--<center >-->
        <!--<h3>Registro</h3>-->
        <!--</center>-->
        <form>
            <fieldset>
                <legend><b class="black">Datos Personales</b></legend> 

                <div class="row">
                    <div class="two fourth padded">
                        <span class="red"><b>* </b></span><?php echo Class_message::get('msgNames') ?>
                        <input id="txtNameWorkPeopleRegister" title="Escriba el nombre" type="text" placeholder="Ingrese Aquí su nombre" required="true">

                    </div>
                    <div class="one fourth padded">
                        <span class="red"><b>* </b></span>Apellido Paterno
                        <input id="txtLastNameWorkPeopleRegister" type="text" placeholder="Ingrese Aquí su Apellidos" required="true">

                    </div>
                    <div class="one fourth padded">
                        <span class="red"><b>* </b></span>Apellido Materno
                        <input id="txtLastNameWorkPeopleRegister" type="text" placeholder="Ingrese Aquí su Apellidos" required="true">

                    </div>
                </div>
                <div class="row">
                    <div class="one fourth padded">
                        Tipo de Documento
                        <select id="cmbRegisterTypeDocument">

                        </select>
                    </div>
                    <div class="one fourth padded">
                        <span class="red"><b>* </b></span>Numero de Documento
                        <input id="txtDocumentIdentityWorkPeopleRegister" type="text" placeholder="Ingrese Aquí su Documento de identidad" max="8" maxlength="8"  required="true">

                    </div>
                    <div class="one fourth padded">
                        Fecha de Nacimiento
                        <input type="text" id="txtdatBirthRegisterWorkPeople" value=""> 
                    </div>
                    <div class="one fourth padded">
                        <span class="red"><b>* </b></span><?php echo Class_message::get('msgEmail') ?>
                        <input type="email" placeholder="Ingrese Aquí su Documento de Correo electronico"required="true" >

                    </div>
                </div>
                <div class="row">
                    <div class="two fourth padded">
                        Profesion
                        <select id="cmbRegisterProfessions">
                            <option>
                                 <?php echo Class_message::get('TxtSelectionOneOption') ?>
                            </option>
                        </select>
                    </div>

                    <div class="one fourth padded">
                        Estado Civil
                        <select id="cmbRegisterStatusCivil">
                            <option value="0">
                                     <?php echo Class_message::get('TxtSelectionOneOption') ?>
                            </option>
                        </select>
                    </div>
                    <div class="one fourth padded">
                        Sexo
                        <select id="cmbRegisterSexo">
                            <option>

                            </option>
                        </select>
                    </div>

                </div>


                <div class="row">
                    <div class="two fourths padded">
                        <label>Departamento</label>
                        <select>
                            <option>

                            </option>
                        </select>
                    </div>
                    <div class="one fourth padded"><span class="select-wrap">
                            <label>Provincia</label>
                            <select>
                                <option>

                                </option>
                            </select></span></div>
                    <div class="one fourth padded">
                        <label>Distrito</label>
                        <select>
                            <option>

                            </option>
                        </select>
                    </div>
                </div>
                <div class="row">
                    <div class="two fourth padded">
                        Direccion
                        <input type="text">
                    </div>
                    <div class="one fourth padded">
                        Telefeono Fijo
                        <input type="text">
                    </div>
                    <div class="one fourth padded">
                        Telefeono Celular
                        <input type="text">
                    </div>
                </div>


            </fieldset>
            <fieldset>
                <legend>Datos del Area</legend>

                <div class="row">
                    <div class="two fourths padded">
                        <span class="red"><b>* </b></span> Area de Trabajo
                        <select id="cmbRegisterArea">
                            <option>
                                <?php echo Class_message::get('TxtSelectionOneOption') ?>
                            </option>
                        </select>  
                    </div>
                    <div class="two fourths padded">
                        <span class="red"><b>* </b></span>Puesto de Trabajo
                        <select id="cmbRegisterWorkStation">
                            <option>
                                <?php echo Class_message::get('TxtSelectionOneOption') ?>
                            </option>
                        </select>
                    </div>
                </div>




            </fieldset>
            <br>
            <button type="button" id="btnSaveWorkPeople" onclick="_saveWorkPeople()"><?php echo Class_message::get('BtnSave') ?></button>
            <button type="reset">Limpiar</button>
            <b><label id="msgRgisterWorkPeople" class="red">MEnsaje</label></b>
        </form>
    </section>
</div>
<script>
    $("#txtdatBirthRegisterWorkPeople").datepicker();
    function _saveWorkPeople() {

        if ($('#txtNameWorkPeopleRegister').val().length < 1) {

//            $('#txtNameWorkPeopleRegister').attr('title', "Campo es Obligatorio");
            $('#txtNameWorkPeopleRegister').focus();
            $('#txtNameWorkPeopleRegister').tooltip();
            $('#msgRgisterWorkPeople').html("El nombre es Obligatorio");
        }
        else if ($('#txtLastNameWorkPeopleRegister').val().length < 1) {
            $('#txtLastNameWorkPeopleRegister').focus();
            $('#txtLastNameWorkPeopleRegister').tooltip();
            $('#msgRgisterWorkPeople').html("Los Apellidos son Obligatorio");
        }
        else if ($('#txtDocumentIdentityWorkPeopleRegister').val().length != 8) {
            $('#txtDocumentIdentityWorkPeopleRegister').attr('title', "Debe Escribir los 8 ditos");
            $('#txtDocumentIdentityWorkPeopleRegister').focus();
            $('#txtDocumentIdentityWorkPeopleRegister').tooltip();
            $('#msgRgisterWorkPeople').html("El Dni es Obligatorio");
        }

    }
    $.getJSON('<?php echo Class_config::get('urlApp') ?>/?controller=WorkStation&&action=List', function(data) {
        for (var i = 0; i < data.length; i++) {

            $('#cmbRegisterWorkStation').append("<option value=\"" + data[i].pkWorkStation + "\">" + data[i].description + "</option>")
//            $('#txtModifyUserType').append("<option value=\"" + data[i].pkWorkStation + "\">" + data[i].description + "</option>")
//            $('#cmbWorkStationModifyPermissions').append("<option value=\"" + data[i].pkWorkStation + "\">" + data[i].description + "</option>")
        }

    });

    $.getJSON('<?php echo Class_config::get('urlApp') ?>/?controller=Area&&action=List', function(data) {
        for (var i = 0; i < data.length; i++) {

            $('#cmbRegisterArea').append("<option value=\"" + data[i].pkArea + "\">" + data[i].description + "</option>")
//            $('#txtModifyUserType').append("<option value=\"" + data[i].pkWorkStation + "\">" + data[i].description + "</option>")
//            $('#cmbWorkStationModifyPermissions').append("<option value=\"" + data[i].pkWorkStation + "\">" + data[i].description + "</option>")
        }

    });
    $.getJSON('<?php echo Class_config::get('urlApp') ?>/?controller=Professions&&action=List', function(data) {
        for (var i = 0; i < data.length; i++) {

            $('#cmbRegisterProfessions').append("<option value=\"" + data[i].pkProfessions + "\">" + data[i].description + "</option>")
//            $('#txtModifyUserType').append("<option value=\"" + data[i].pkWorkStation + "\">" + data[i].description + "</option>")
//            $('#cmbWorkStationModifyPermissions').append("<option value=\"" + data[i].pkWorkStation + "\">" + data[i].description + "</option>")
        }

    });
    $.getJSON('<?php echo Class_config::get('urlApp') ?>/?controller=StatusCivil&&action=List', function(data) {
        for (var i = 0; i < data.length; i++) {

            $('#cmbRegisterStatusCivil').append("<option value=\"" + data[i].pkStatusCivil + "\">" + data[i].description + "</option>")
//            $('#txtModifyUserType').append("<option value=\"" + data[i].pkWorkStation + "\">" + data[i].description + "</option>")
//            $('#cmbWorkStationModifyPermissions').append("<option value=\"" + data[i].pkWorkStation + "\">" + data[i].description + "</option>")
        }

    });
    $.getJSON('<?php echo Class_config::get('urlApp') ?>/?controller=TypeDocument&&action=List', function(data) {
        for (var i = 0; i < data.length; i++) {

            $('#cmbRegisterTypeDocument').append("<option value=\"" + data[i].pkTypeDocument + "\">" + data[i].description + "</option>")
//            $('#txtModifyUserType').append("<option value=\"" + data[i].pkWorkStation + "\">" + data[i].description + "</option>")
//            $('#cmbWorkStationModifyPermissions').append("<option value=\"" + data[i].pkWorkStation + "\">" + data[i].description + "</option>")
        }

    });
    $.getJSON('<?php echo Class_config::get('urlApp') ?>/?controller=Sexo&&action=List', function(data) {
        for (var i = 0; i < data.length; i++) {

            $('#cmbRegisterSexo').append("<option value=\"" + data[i].pkSexo + "\">" + data[i].description + "</option>")
//            $('#txtModifyUserType').append("<option value=\"" + data[i].pkWorkStation + "\">" + data[i].description + "</option>")
//            $('#cmbWorkStationModifyPermissions').append("<option value=\"" + data[i].pkWorkStation + "\">" + data[i].description + "</option>")
        }

    });
</script>

